﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CostAccounting.Edit.Print.aspx.cs"
    Inherits="CostAccountingPrint" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Internal Accounting Detail Print</title>
    <script src="assets/js/jquery-1.4.2.js" type="text/javascript"></script>
    <link rel="stylesheet" href="assets/css/reset.css" type="text/css" />
    <link rel="stylesheet" href="assets/css/styleexpress.css" type="text/css" />
    <script src="assets/jquery/jquery.printElement.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getUrlVars() {
            var vars = {};
            var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
                vars[key] = value;
            });
            return vars;
        }
        jQuery("document").ready(function () {
            if (getUrlVars()['id'] != "") {
                //$('#body-wrapper').printElement({overrideElementCSS: ['assets/css/InternalAccPrint.css'],pageTitle:['Internal Accounting Print']});
                printElem({ overrideElementCSS: ['assets/css/print.css'] });
            }
        });
        function printElem(options) {
            $('#body-wrapper').printElement(options);

        }
    </script>
    <style type="text/css">
        .content-box
        {
            border: none !important;
            margin: 0 0 20px 0;
            background: #fff;
        }
        #main-content1 tbody, #main-content tbody
        {
            border-bottom: none !important;
        }
        .thheader
        {
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        table.adminlist td
        {
            padding: 7px !important;
        }
        table.adminlist thead th
        {
            padding: 7px !important;
        }
        .bottom td
        {
            font-weight: bold;
            text-align: right;
        }
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="main-content1">
            <h2>
                SỐ FILE:
                <% = FileNumber%>
                -
                <%=Customer %>
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                <!--Cost Accounting Part 1-->
                <table width="100%" border="10px solid;">
                    <tr>
                        <td>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                <tr style="background: #ECECEC;">
                                    <td align="center" class="thheader">
                                        Số file
                                    </td>
                                    <td align="center" class="thheader">
                                        POL
                                    </td>
                                    <td align="center" class="thheader">
                                        POD
                                    </td>
                                    <td align="center" class="thheader">
                                        ETD
                                    </td>
                                    <td align="center" class="thheader">
                                        ETA
                                    </td>
                                    <td align="center" class="thheader">
                                        Nhà cung cấp
                                    </td>
                                    <td align="center" class="thheader">
                                        Carr Sale
                                    </td>
                                    <td align="center" class="thheader">
                                        Khách hàng
                                    </td>
                                    <td align="center" class="thheader">
                                        Cust Pic
                                    </td>
                                    <td align="center" class="thheader">
                                        M/BL NO
                                    </td>
                                    <td align="center" class="thheader">
                                        H/BL NO
                                    </td>
                                    <td align="center" class="thheader">
                                        Freight
                                    </td>
                                    <td align="center" class="thheader">
                                        Công nợ
                                    </td>
                                </tr>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                    <td>
                                        <%=FileNumber%>
                                    </td>
                                    <td>
                                        <%=POL%>
                                    </td>
                                    <td>
                                        <%=POD%>
                                    </td>
                                    <td>
                                        <%=ETD%>
                                    </td>
                                    <td>
                                        <%=ETA%>
                                    </td>
                                    <td>
                                        <%=Agent%>
                                    </td>
                                    <td>
                                        <%=CarrSale %>
                                    </td>
                                    <td>
                                        <%=Customer%>
                                    </td>
                                    <td>
                                        <%=CustPic%>
                                    </td>
                                    <td>
                                        <%=MBLNo%>
                                    </td>
                                    <td>
                                        <%=HBLNo%>
                                    </td>
                                    <td>
                                        <%=Freight%>
                                    </td>
                                    <td>
                                        <%=Liabilities%>
                                    </td>
                                </tr>
                                <tr style="background: #ECECEC;">
                                    <td align="center" class="thheader">
                                        Lãi suất(%)
                                    </td>
                                    <td align="center" class="thheader">
                                        % TB K.hàng
                                    </td>
                                    <td align="center" class="thheader">
                                        % TB Nhà CC
                                    </td>
                                    <td align="center" class="thheader">
                                        Tên Sale
                                    </td>
                                    <td align="center" class="thheader">
                                        Văn phòng
                                    </td>
                                    <td align="center" class="thheader">
                                        Người lập
                                    </td>
                                    <td align="center" class="thheader">
                                        Ngày lập
                                    </td>
                                    <td align="center" class="thheader">
                                        Số hóa đơn
                                    </td>
                                    <td align="center" class="thheader">
                                        Ngày hóa đơn
                                    </td>
                                    <td align="center" class="thheader">
                                        Tỷ giá mua vào
                                    </td>
                                    <td align="center" class="thheader">
                                        Tỉ giá bán ra
                                    </td>
                                    <td align="center" class="thheader">
                                        Ngày trả
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                    <td>
                                        <%=Interest%>
                                    </td>
                                    <td>
                                        <%=TB_Customer%>
                                    </td>
                                    <td>
                                        <%=TB_Agent%>
                                    </td>
                                    <td>
                                        <%=SaleName%>
                                    </td>
                                    <td>
                                        <%=SaleOfProvince%>
                                    </td>
                                    <td>
                                        <%=AccountingName%>
                                    </td>
                                    <td>
                                        <%=AccountingDate%>
                                    </td>
                                    <td>
                                        <%=InvoicesNo%>
                                    </td>
                                    <td>
                                        <%=InvoicesDate%>
                                    </td>
                                    <td>
                                        <%=RateBuy%>
                                    </td>
                                    <td>
                                        <%=RateSell%>
                                    </td>
                                    <td>
                                        <%=Date_Expiration%>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Repeater ID="rptData" runat="server">
                                <ItemTemplate>
                                    <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                        <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                            <asp:HiddenField ID="ID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ID")%>'>
                                            </asp:HiddenField>
                                        </td>
                                        <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "Description")%>
                                        </td>
                                        <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "Units")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Amount")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "TypeOfCurrency")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "BuyPrice")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "BuyTotal")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "BuyPriceInvoice")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "BuyTotalInvoice")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "SellPrice")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "SellTotal")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "SellPriceInvoice")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "SellTotalInvoice")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "SellTotalInvoiceVND")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "ComAgent")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "ComCustomer")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "TaxAgent")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "TaxCustomer")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Profit")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Note")%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                        <thead>
                                            <tr>
                                                <th align="center" class="thheader" rowspan="2">
                                                    Stt
                                                </th>
                                                <th align="center" class="thheader" colspan="4">
                                                    Chi tiết
                                                </th>
                                                <th align="center" class="thheader" colspan="2">
                                                    Mua vào
                                                </th>
                                                <th align="center" class="thheader" colspan="2">
                                                    Hóa đơn mua vào
                                                </th>
                                                <th align="center" class="thheader" colspan="2">
                                                    Bán ra
                                                </th>
                                                <th align="center" class="thheader" colspan="3">
                                                    Hóa đơn bán ra
                                                </th>
                                                <th align="center" class="thheader" colspan="2">
                                                    Com
                                                </th>
                                                <th align="center" class="thheader" colspan="2">
                                                    Thuế thu lại
                                                </th>
                                                <th align="center" class="thheader" rowspan="2" style="width: 50px;">
                                                    Lãi suất
                                                </th>
                                                <th align="center" class="thheader" rowspan="2" style="width: 100px;">
                                                    Ghi chú
                                                </th>
                                            </tr>
                                            <tr>
                                                <th align="center" class="thheader" width="50px">
                                                    Mô tả
                                                </th>
                                                <th align="center" class="thheader" width="50px">
                                                    Đơn vị tính
                                                </th>
                                                <th align="center" class="thheader" width="30px">
                                                    Số lượng
                                                </th>
                                                <th align="center" class="thheader" width="30px">
                                                    Loại tiền
                                                </th>
                                                <th align="center" class="thheader">
                                                    Đơn giá
                                                </th>
                                                <th align="center" class="thheader">
                                                    Thành tiền
                                                </th>
                                                <th align="center" class="thheader">
                                                    Đơn giá
                                                </th>
                                                <th align="center" class="thheader">
                                                    Thành tiền
                                                </th>
                                                <th align="center" class="thheader">
                                                    Đơn gián
                                                </th>
                                                <th align="center" class="thheader">
                                                    Thành tiền
                                                </th>
                                                <th align="center" class="thheader">
                                                    Đơn giá
                                                </th>
                                                <th align="center" class="thheader">
                                                    Thành tiền
                                                </th>
                                                <th align="center" class="thheader">
                                                    Thành tiền VND
                                                </th>
                                                <th align="center" class="thheader" style="width: 40px;">
                                                    Nhà CC
                                                </th>
                                                <th align="center" class="thheader" style="width: 40px;">
                                                    Khách hàng
                                                </th>
                                                <th align="center" class="thheader">
                                                    Nhà CC
                                                </th>
                                                <th align="center" class="thheader">
                                                    Khách hàng
                                                </th>
                                            </tr>
                                        </thead>
                                </HeaderTemplate>
                                <FooterTemplate>
                                    <tr class="bottom">
                                        <td colspan="5">
                                            Tổng tiền USD
                                        </td>
                                        <td colspan="2">
                                            <%=BuyTotal_USD.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=BuyTotalInvoice_USD.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=SellTotal_USD.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=SellTotalInvoice_USD.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                            <%=ComAgent_USD.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=ComCustomer_USD.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=TaxAgent_USD.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=TaxCustomer_USD.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=Profit_USD.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr class="bottom">
                                        <td colspan="5">
                                            Tổng tiền VND
                                        </td>
                                        <td colspan="2">
                                            <%=BuyTotal_VND.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=BuyTotalInvoice_VND.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=SellTotal_VND.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=SellTotalInvoice_VND.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                            <%=ComAgent_VND.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=ComCustomer_VND.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=TaxAgent_VND.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=TaxCustomer_VND.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=Profit_VND.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr class="bottom">
                                        <td colspan="5">
                                            Quy đổi VND
                                        </td>
                                        <td colspan="2">
                                            <%=BuyTotal_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=BuyTotalInvoice_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=SellTotal_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td colspan="2">
                                            <%=SellTotalInvoice_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=SellTotalInvoice_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=ComAgent_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=ComCustomer_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=TaxAgent_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=TaxCustomer_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                            <%=Profit_ALL.ToString("#,#.##") %>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    </table>
                                </FooterTemplate>
                            </asp:Repeater>
                        </td>
                    </tr>
                </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
